package com.atguigu.common.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

//@AllArgsConstructor 它默认提供的构造是public的 加在枚举上 不报错但是不起作用
@Getter
public enum GulimallEnum {
    //枚举常量 也就是该枚举类的一个对象 内部调私有构造完成初始化
    UNKONW_EXCEPTION(10000,"系统抛出未知异常"),
    ERR_CHECK_IN_PARRAM(10001,"参数校验异常"),
    ERR_Merge_Purchase(10002,"订单合并异常"),

    ERR_FINISH_PURCHASE(10002,"采购需求状态不合法"),
    PRODUCT_UP_ERROR(10003,"商品上架网络出现问题"),
    EXCUTE_SEARCH_ERROR(10003,"es聚合搜索失败");
    private Integer code;
    private String msg;
    private GulimallEnum(Integer code,String msg){
        this.code=code;
        this.msg=msg;
    }
}
